// Album.sl
// Album Lookup List

Use DFClient.pkg
Use cDbCJGridPromptList.pkg
Use cDbCJGridColumn.pkg
Use Windows.pkg

Use cAlbumDataDictionary.dd

CD_Popup_Object Album_sl is a dbModalPanel
    Set Location to 5 5
    Set Size to 134 220
    Set Label To "Album Lookup List"
    Set Border_Style to Border_Thick
    Set Minimize_Icon to False


    Object oAlbum_DD is a cAlbumDataDictionary
    End_Object // oAlbum_DD

    Set Main_DD To oAlbum_DD
    Set Server  To oAlbum_DD



    Object oSelList is a cDbCJGridPromptList
        Set Size to 105 210
        Set Location to 5 5
        Set peAnchors to anAll
        Set psLayoutSection to "Album_sl_oSelList"
        Set Ordering to 1
        Set pbAutoServer to True

        Object oAlbum_TITLE is a cDbCJGridColumn
            Entry_Item Album.TITLE
            Set piWidth to 225
            Set psCaption to "Title"
        End_Object // oAlbum_TITLE

        Object oAlbum_TOTAL_TRACKS is a cDbCJGridColumn
            Entry_Item Album.TOTAL_TRACKS
            Set piWidth to 90
            Set psCaption to "Total Tracks"
        End_Object // oAlbum_TOTAL_TRACKS


    End_Object // oSelList

    Object oOk_bn is a Button
        Set Label to "&Ok"
        Set Location to 115 57
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send OK of oSelList
        End_Procedure

    End_Object // oOk_bn

    Object oCancel_bn is a Button
        Set Label to "&Cancel"
        Set Location to 115 111
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send Cancel of oSelList
        End_Procedure

    End_Object // oCancel_bn

    Object oSearch_bn is a Button
        Set Label to "&Search..."
        Set Location to 115 165
        Set peAnchors to anBottomRight

        Procedure OnClick
            Send Search of oSelList
        End_Procedure

    End_Object // oSearch_bn

    On_Key Key_Alt+Key_O Send KeyAction of oOk_bn
    On_Key Key_Alt+Key_C Send KeyAction of oCancel_bn
    On_Key Key_Alt+Key_S Send KeyAction of oSearch_bn


CD_End_Object // Album_sl
